#include <stdio.h>
#define OFFSETOF(type,name) (size_t)&(((type*)0)->name)
struct S
{
	int a;
	char b;
	double c;
};
int main()
{
	struct S s;
	printf("%d\n", OFFSETOF(struct S, a));
	printf("%d\n", OFFSETOF(struct S, b));
	printf("%d\n", OFFSETOF(struct S, c));
	return 0;
}